package hu;

import java.util.*;

public class hu69 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int y = sc.nextInt();
        int z = sc.nextInt();
        int[][] A = new int[x][y];
        int[][] B = new int[y][z];
        for (int i = 0; i < x; i++) {
            for (int j = 0; j < y; j++) {
                A[i][j] = sc.nextInt();
            }
        }
        for (int i = 0; i < y; i++) {
            for (int j = 0; j < z; j++) {
                B[i][j] = sc.nextInt();
            }
        }
        int[][] ans = new int[x][z];
        for (int i = 0; i < x; i++) {
            for (int j = 0; j < z; j++) {
                int[] b = new int[y];
                for (int k = 0; k < y; k++) {
                    b[k] = B[k][j];
                }
                ans[i][j] = Chengfa(A[i], b);
            }
        }
        for (int i = 0; i < x; i++) {
            for (int j = 0; j < z; j++) {
                System.out.print(ans[i][j] + " ");
            }
            System.out.println();
        }
    }
    public static int Chengfa(int[] a, int[] b){
        int sum = 0;
        for (int i = 0; i < a.length; i++) {
            sum += a[i] * b[i];
        }
        return sum;
    }
}
